import Vue from 'vue'
import VueRouter from 'vue-router'
import index from '../views/index.vue'
import search1 from '../views/search.vue'
import list from '../views/list.vue'
import play from '../views/play.vue'
Vue.use(VueRouter) 

const routes = [
  {
    path: '/',
    name: 'index',
    component: index,
    children:[
      {
        path: '/search',
        name: 'search',
        component: search1,
      }
    ],
  },
  {
    path:'/list',
    name:'list',
    component:list
  },
  {
    path:'/play',
    name:'play',
    component:play
  }
]

const router = new VueRouter({
  routes
})

export default router
